<?php

/*
**	Post
**	Displays the content and comments of a single post.
**
**	- Comment form is disabled if user is not logged in.
*/



$data['applicationTitle'] = $this->lang->line('ligature_title');;
$data['pageTitle'] = $this->lang->line('ligature_post_title');
$data['pageId'] = 'post';

$data['message'] = $this->session->flashdata('message');

$post = $this->Ligature_Post_model->readPostBySlug($slug);
$data['postComments'] = $this->Ligature_Comment_model->listCommentsForPost($post->getPostId());
$post->setCommentCount(sizeof($data['postComments']));
$data['post'] = $post;
$data['currentUserName'] = $this->session->userdata('current_user_name');

log_message('debug', '************************ ' . $this->session->userdata('current_user_id'));

$this->load->view($this->config->item('theme', 'ligature') . '/header', $data);
$this->load->view($this->config->item('theme', 'ligature') . '/post', $data);
$this->load->view($this->config->item('theme', 'ligature') . '/footer', $data);

/* clickframes::version=1007005551::clickframes */
?>